//decryptor.cpp
#include "decryptor.h"

word decryptor::decrypt (word w)
{
	word wp = lshift(w);
	char* str = wp.getstr();
	int i;
	for (i = 0; i < wp.getlen(); i++)
	{
		if (i % 2 == 0)
		{
			str[i] = down(str[i]);
		}
		else
		{
			str[i] = up(str[i]);
		}
	}
	str[wp.getlen()] = '\0';
	word result(str);
	return result;
}

